'use strict';
let even_asc_odd_desc = function(collection){
    var isEven=i=>i%2===0;
    var sort=collection.sort((a,b)=>{
        if(a>b) return 1
        if(a<b) return -1
        return 0
    })
    let even=sort.filter(x=>isEven(x))
    let odd=sort.filter(x=>!isEven(x))
    return even.concat(odd.reverse())
};
module.exports = even_asc_odd_desc;
